<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
	uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
	uri="https://ajax4jsf.dev.java.net/ajax" prefix="ajax"%>
<%@taglib
	uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="styles/style.css" type="text/css" rel="stylesheet"></link>
<title>Insert title here</title>
</head>
<body>
<div class="mainBackground">
	<div class="innerBackground">
<f:view locale="#{visitInfo.currentUser.locale}">
	<f:loadBundle basename="resources.VisionClickResources" var="msg"/>
	<jsp:include page="nav.jsp"/>
		<div class="table">
			<div class="tableHead"><h:outputText value="#{msg.PersonalBurndownChart}"/></div>
					<h:graphicImage url="#{chartBean.fileName}"></h:graphicImage>
		</div>
		<div class="table" style="width:960px;">
					<div class="tableHead" style="width:960px;"><h:outputText value="#{msg.MyTasks}"/></div>
					<h:form>
					<h:dataTable border="0" value="#{taskBean.userTasks}" var="task" width="960" captionStyle="background-color:gray;" rowClasses="row">
						<h:column id="column0">
							<f:facet name="header">
								<h:outputText value="#{msg.Tag}"></h:outputText>
							</f:facet>
							<h:graphicImage url="images/task.jpg" style="width:10px;height:10px;"></h:graphicImage>
						</h:column>
						<h:column id="column1">
							<f:facet name="header">
								<h:outputText value="#{msg.TaskName}"></h:outputText>
							</f:facet>
							<h:commandLink action="showtask">
								<h:outputText value="#{task.taskName}"></h:outputText>
								<f:param value="#{task.taskId}" name="taskId"></f:param>
							</h:commandLink>
						</h:column>
						<h:column id="column2">
							<f:facet name="header">
								<h:outputText value="#{msg.TaskDesc}"></h:outputText>
							</f:facet>
							<h:outputText value="#{task.taskDesc}"></h:outputText>
						</h:column>
						<h:column id="column3">
							<f:facet name="header">
								<h:outputText value="#{msg.TaskState}"></h:outputText>
							</f:facet>
							<h:outputText value="#{task.state}"></h:outputText>
						</h:column>
					</h:dataTable>
					</h:form>
			</div><!-- end of task div -->
				<ajax:repeat value="#{sprintBean.sprintWithTasks}" var="sprint">
					<div class="table" style="width:960px;">
						<div class="tableHead" style="width:960px;">
						<h:outputText value="#{sprint.releatedProject}">
							<f:converter converterId="projectConverter"/>
						</h:outputText></div>
						<h:dataTable border="0" value="#{sprint.taskList}" var="task">
							<h:column id="column1">
								<f:facet name="header">
									<h:outputText value="Task 名称"></h:outputText>
								</f:facet>
								<h:outputText value="#{task.taskName}"></h:outputText>
							</h:column>
							<h:column id="column2">
								<f:facet name="header">
									<h:outputText value="#{msg.Rank}"></h:outputText>
								</f:facet>
								<h:outputText value="#{task.rank}"></h:outputText>
							</h:column>
							<h:column id="column3">
								<f:facet name="header">
									<h:outputText value="#{msg.Executor}"></h:outputText>
								</f:facet>
								<h:outputText value="#{task.executor}">
									<f:converter converterId="userConverter"/>
								</h:outputText>
							</h:column>
							
							<h:column id="column4">
								<f:facet name="header">
									<h:outputText value="#{msg.Fetch}"></h:outputText>
								</f:facet>
								<h:form>
									<h:commandLink value="#{msg.Fetch}" rendered="#{task.canFetch}" actionListener="#{taskBean.fetchTask}">
										<f:param value="#{task.taskId}" name="taskId"/>
									</h:commandLink>
								</h:form>
							</h:column>
							
						</h:dataTable>
					</div>
				</ajax:repeat>
			</f:view>
</div>
</div>	
</body>
</html>